package com.itheima.ai.maolong.repository.impl;

import com.itheima.ai.maolong.repository.ChatHistRepository;
import org.springframework.scheduling.annotation.Async;

import java.util.List;

public class ChatHistRepositoryImpl implements ChatHistRepository {
    @Override
    public void save(String type, String chatId) {

    }

    @Override
    public List<String> getChatIds(String userId,String type) {
        return List.of();
    }

    @Override
    @Async("executorService")
    public void deleteSyncTask() {
        // 查询所有的用户id
        // from mysql

        //根据用户id查询所有的会话id
        //from mongo

        //根据会话id查询对应消息的过期时间等;
        //from mongo

        //如果过期时间与当前时间相比, 是否达到删除期限
        //逻辑
    }

    @Override
    public void delete(String chatId) {

    }
}
